package algorithm.poj.p1000;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLDecoder;

/**
 * 
 * @author Administrator
 *
 */
public class P1905 {

	public static void main(String[] args)
	throws Exception {

		InputStream input = null;
		if (false) {
			input = System.in;
		} else {
			URL url = P1905.class.getResource("P1905.txt");
			File file = new File(URLDecoder.decode(url.getPath(), "UTF-8"));
			input = new FileInputStream(file);
		}
		
		BufferedReader stdin = new BufferedReader(new InputStreamReader(input));

        String line = stdin.readLine().trim();
        while (line != null) {
        	String[] tmp = line.trim().split(" ");
        	double length = Double.valueOf(tmp[0]);
        	double degree = Double.valueOf(tmp[1]);
        	double coefficient = Double.valueOf(tmp[2]);
        	
        	if (length < 0 && degree < 0 && coefficient < 0) {
        		break;
        	} else {
        		double h = d(length, degree, coefficient);
        		String H = Long.valueOf((long)(h*1000 + 0.5)).toString();
        		if (H.length() <= 3) {
        			while (H.length() < 3) H = "0" + H;
            		System.out.println("0." + H);
        		} else {
            		System.out.println(H.substring(0, H.length()-3) + "." + H.substring(H.length()-3));
        		}
            	line = stdin.readLine().trim();
        	}
        }
	}

	private static double d(double length, double degree, double coefficient) {

		double l = 1.0/2.0f;
		double L = 1.0*(1.0f + degree*coefficient)/2.0f;
		if (l == L) {
			return 0.0f;
		}
		double a = l/L;
		/*
		 * sin(L/R) = l/R
		 * h = R - sqrt(R^2 - l^2)
		 * 
		 * 假设L/R=x => sin(x) = ax
		 */
		double x = solve(a);
		double R = L/x;
		double h = R - Math.sqrt(R*R-l*l);
		return length*h;
	}
	
	/**
	 * sin(x) = a*x
	 * 用二分法求解
	 * @param a
	 * @return
	 */
	private static double solve(double a) {
		
		if (a >= 1.0) {
			return 0.0f;
		} else {
			double eps = 1.0e-12;
			double x1 = 0.0f;
			double x2 = 2*Math.PI;
			double x = 0.0f;
			double y = 0.0f;
			do {
				x = (x1+x2)/2.0f;
				y = Math.sin(x) - a*x;
				if (y > 0) {
					x1 = x;
				} else {
					x2 = x;
				}
			} while (Math.abs(y) > eps);
			return x;
		}
	}
}
